<?php if (!defined('THINK_PATH')) exit();?><div class="bjui-pageContent">
    <form action="<?php echo U('save_area');?>" data-callback="dialogFormCall" data-toggle="validate" data-alertmsg="false" class="dialogForm">
        <input type="hidden" name="id" value="<?php echo ($va["id"]); ?>"/>
        <div class="form-group">
            <label class="x100">区域名称:</label>
            <input type="text" name="name" data-rule="required" value="<?php echo ($va["name"]); ?>"/>
        </div>
        <div class="form-group">
            <label class="x100">上级区域:</label>
            <select name="parent_id" id="groy-type1" data-toggle="selectpicker" data-nextselect="#groy-type2" data-refurl="<?php echo U('Index/getarea');?>?v={value}">
                <option value="0">顶级分类</option>
                <?php if(is_array($res)): $i = 0; $__LIST__ = $res;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["id"]); ?>" <?php if($va['parent_id'] == $vo['id']): ?>selected<?php endif; ?>><?php echo ($vo["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
            </select>
            <select name="pre_parent_id" id="groy-type2" data-toggle="selectpicker" data-nextselect="#groy-type3" data-refurl="<?php echo U('Index/getarea');?>?v={value}">
                <?php if($va["level"] == '3' or $va["level"] == '4'): ?><option value="<?php echo ($va["pre_parent_id"]); ?>"><?php echo ($va["parent_name"]); ?></option>
                <?php else: ?>
                <option value="0">--请选择--</option><?php endif; ?>
            </select>
            <select name="pre_pre_parent_id" id="groy-type3" data-toggle="selectpicker">
                <?php if($va["level"] == '4'): ?><option value="<?php echo ($va["pre_pre_parent_id"]); ?>"><?php echo ($va["pre_parent_name"]); ?></option>
                <?php else: ?>
                <option value="0">--请选择--</option><?php endif; ?>
            </select>
        </div>
        <div class="form-group">
            <label class="x100">状态:</label>
             <input type="radio" name="status" value="0" id="groy-status1" data-toggle="icheck" data-label="显示"  <?php if($va["status"] != '1'): ?>checked<?php endif; ?> />
             <input type="radio" name="status" value="1" id="groy-status2" data-toggle="icheck" data-label="不显示"  <?php if($va["status"] == '1'): ?>checked<?php endif; ?> />
        </div>
    </form>
</div>
<script>
    $(function () {
//        $('.groy-type1').
    });
</script>

<div class="bjui-pageFooter">
		
	<?php if(save == save): ?><ul>
			<li><button type="submit" class="btn-default" data-icon="save">保存</button></li>
	        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
	    </ul>
	<?php elseif(save == close): ?>
	    <ul>
	        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
	    </ul>
	<?php elseif(save == page and $show != null): ?>
		<ul>
	        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
	    </ul>
		    <div class="pages">
		        <span>每页&nbsp;</span>
		        <div class="selectPagesize">
		            <select data-toggle="selectpicker" data-toggle-change="changepagesize">
		                <option value="<?php echo ($show['listrow']); ?>"><?php echo ($show['listrow']); ?></option>
		                <option value="60">60</option>
		                <option value="120">120</option>
		                <option value="150">150</option>
		            </select>
		        </div>
		        <span>&nbsp;条，共 <?php echo ($show['total']); ?> 条</span>
		    </div>
		    <div class="pagination-box" data-toggle="pagination" data-total="<?php echo ($show['total']); ?>" data-page-size="<?php echo ($show['listrow']); ?>" data-page-current="1">
		    </div>
	<?php elseif(save == page and $show == null): ?>
		<ul>
			<li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
		</ul>
	<?php else: ?>
		<ul>
			<li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
		</ul><?php endif; ?>

</div>